<#import "../tpl/pageTep.ftl" as page>
<@page.pageBase currentMenu="评价详情">
<style>
    .control-group {
        margin-left: -37px;
    }
    #commentPic {
        height: 185px;
    }
</style>
<div class="xm-offline">
    <div class="row">
        <div class="panel">
            <div class="returnBtn panel-header">
                <a href="${basepath}/rest/manage/comment/toList">返回上一级</a>
            </div>
        </div>
        <div class="panel">
            <div class="panel-body">
                <form id="editForm" class="form-horizontal">
                    <div class="control-group">
                        <label class="control-label">
                            评价人：
                        </label>

                        <div class="controls">
                            <input type="text" class="input-normal control-text"  value="${e.userName!}" disabled="disabled">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">
                            评价时间：
                        </label>

                        <div class="controls">
                            <input type="text" class="input-normal control-text"  value="${e.createTime!}" disabled="disabled">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">
                            商品名称：
                        </label>

                        <div class="controls">
                            <input type="text" class="input-normal control-text"  value="${e.productName!}" disabled="disabled">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">
                            商品规格：
                        </label>

                        <div class="controls">
                            <input type="text" class="input-normal control-text"  value="${e.specInfo!}" disabled="disabled">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">
                            评价内容：
                        </label>

                        <div class="controls control-row12" style="height: 225px;initialFrameWidth: 100%;">
                            <textarea type="text" data-rules="{required:true}" class="input-large"
                                      id="content" style="height: 200px" disabled="disabled">${e.content!}</textarea>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">
                            评价图片：
                        </label>

                        <div class="controls" id="commentPic">

                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script>
    /*
    * 判断图片单张图片还是多张图片还是无没图片
    * */
    function commentPicList(){
        var pictures="${e.picture!}";
        if(pictures.indexOf(",")!=-1){
            var pictureList=pictures.split(",");
            for(var i=0;i<pictureList.length;i++){
                $("#commentPic").append("<img src='/"+pictureList[i]+"' style='height:150px;width:150px;'/>");
            }
        }else if(pictures==""||pictures==null){
            $("#commentPic").append("<p>暂无图片</p>");
        }
        else{
            $("#commentPic").append("<img src='/"+pictures+"' style='height:150px;width:150px;'/>");
        }
    }
    commentPicList();
</script>
</@page.pageBase>